package org.maiyoframework.core.web.page;

import java.io.Serializable;
import java.util.List;

/**
 * 返回给前台页面的分页封装类
 * 
 * @author maiYo
 * 
 * @param <T>
 */
public class Page<T> implements Serializable{

	private static final long serialVersionUID = 5091777332219315951L;
	
	/** 结果记录集 */
	private List<T> recordList;
	
	/** 总页数 */
	private int totalPage;
	
	/** 前台页面分页页码最前面的页码 */
	private int startpage;
	
	/** 前台页面分页页码最后面的页码 */
	private int endPage;
	
	/** 页码 */
	private String paging;
	
	/** 总记录数 **/
	private Long totalCount;

	/** 构造函数 */
	public Page(int startpage, int endPage) {
		this.startpage = startpage;
		this.endPage = endPage;
	}
	
	/** 构造函数 */
	public Page(List<T> recordList, int totalPage, int startpage, int endPage, String paging, Long totalCount) {
		this.recordList = recordList;
		this.totalPage = totalPage;
		this.startpage = startpage;
		this.endPage = endPage;
		this.paging = paging;
		this.totalCount = totalCount;
	}

	/** 结果记录集 */
	public List<T> getRecordList() {
		return recordList;
	}

	public void setRecordList(List<T> recordList) {
		this.recordList = recordList;
	}

	/** 总页数 */
	public int getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	/** 前台页面分页页码最前面的页码 */
	public int getStartpage() {
		return startpage;
	}

	public void setStartpage(int startpage) {
		this.startpage = startpage;
	}

	/** 前台页面分页页码最后面的页码 */
	public int getEndPage() {
		return endPage;
	}

	public void setEndPage(int endPage) {
		this.endPage = endPage;
	}

	/** 页码 */
	public String getPaging() {
		return paging;
	}

	public void setPaging(String paging) {
		this.paging = paging;
	}

	/** 总记录数 **/
	public Long getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Long totalCount) {
		this.totalCount = totalCount;
	}
	
}
